To modify the state of an AASM instance while still going through the transitions, here is what you can do:

```ruby
class YourModel < ActiveRecord::Base
  # temporary variable used in ActiveAdmin after_save
  attr_accessor :active_admin_requested_event
end
```

```ruby
ActiveAdmin.register YourModel do
  after_save do |your_model|
    event = params[:your_model][:active_admin_requested_event]
    unless event.blank?
      # whitelist to ensure we don't run an arbitrary method
      safe_event = (your_model.aasm.events(permitted: true).map(&:name) & [event.to_sym]).first
      raise "Forbidden event #{event} requested on instance #{your_model.id}" unless safe_event
      # launch the event with bang
      your_model.send("#{safe_event}!")
    end
  end

  form do |f|
    # your form ...

    # display current state as disabled to avoid modifying it directly
    f.input :aasm_state, input_html: { disabled: true }, label: 'Current state'

    # use the attr_accessor to pass the data
    f.input :active_admin_requested_event, label: 'Change state', as: :select, collection: f.object.aasm.events(permitted: true).map(&:name)
  end

  # whitelist attribute with strong parameters
  permit_params :active_admin_requested_event, ...
end
```

# Here is an alternate way, using controller actions
assuming you have aasm events defined,
admin/your_models.rb

```ruby
ActiveAdmin.register YourModel  do
  YourModel.aasm.events.each do |aasm_event|
    action = aasm_event.name
    member_action action do
      @your_model = YourModel.find(params[:id])
      @your_model.send(action.to_s + "!")
      redirect_to admin_collection_object_path(@your_model)
    end
  end
end
```
views/admin/your_model/_show.haml

````haml
= your_model.aasm.current_state
- your_model.aasm.events(permitted: true).map(&:name).each do |event|
  =  link_to event.capitalize, send("#{event}_admin_your_model_path", your_model)
```